package com.aigc.txt2img.exception;

public enum ExceptionEnum implements BaseException {

    // 数据操作错误定义
    UNKNOWN(-1, "未知错误"),
    SUCCESS(100, "success"),
    FAIL(101, "fail"),
    CLIENT_PARAMS_INVALID(102, "参数错误"),
    CLIENT_REQUEST_EXCEED(103, "请求太频繁"),
    SERVER_BUSY(104, "服务器繁忙,请稍后再试!"),
    CHECK_POINTER_NULL(105,"数据错误,请检查"),
    NEED_LOGIN(106,"请登录");

    private final int code;
    private final String msg;

    ExceptionEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return msg;
    }

}
